package com.itheima.Mapper;

import com.itheima.Pojo.*;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ClazzMapper {

    @Select("select * from clazz")
    List<Clazz> SelectAll();

    @Delete("delete from clazz where clazz_id = #{id}")
    void deleteById(Integer id);

    void updateById(Clazz clazz);

    @Insert("insert into  clazz (clazz_id,clazz_name,department_code,teacher_id) values(#{clazzId},#{clazzName},#{departmentCode},#{teacherId})")
    void addClass(Clazz clazz);
}
